def display_choice_text(title, field):
    """
    获取模型choice字段的文本信息
    :param title:
    :param field:
    :return:
    """

    def inner(self, obj=None, is_header=False):
        if is_header:
            return title
        return getattr(obj, f'get_{field}_display')

    return inner
